import request from '@/utils/request'
export function fetchList(params) {
    return request({
        url: '/dataset/list',
        method: 'get',
        params: params
    })
}

export function createItem(data) {
    return request({
        url: '/dataset/create',
        method: 'post',
        data: data
    })
}

export function updateItem(id, data) {
    return request({
        url: '/dataset/update/' + id,
        method: 'post',
        data: data
    })
}

export function batchDelete(ids) {
    return request({
        url: '/dataset/batch-delete/' + ids,
        method: 'post',
    })
}

export function deleteItem(id) {
    return request({
        url: '/dataset/delete/' + id,
        method: 'post',
    })
}